Developer Documentation

QuickTime 4 API Documentation

QuickTime 4 Reference

| Previous | Chapter Contents | Chapter Top |

Functions

This section defines the image transcoder component functions.

ImageTranscoderBeginSequence

Initiates an image transcoding sequence and specifies the input data format.

pascal ComponentResult ImageTranscoderBeginSequence (
                     ImageTranscoderComponent itc,
                     ImageDescriptionHandle srcDesc,
                     ImageDescriptionHandle *dstDesc,
                     void *data,
                     long dataSize);
itc
The image transcoder component.

srcDesc
The image description for the source compressed image data.

dstDesc
Returns a new image description.

data
First frame of data to be transcoded (may be nil).

dataSize
Size of compressed image data pointed to by the data.

DISCUSSION

The ImageTranscoderBeginSequence function specifies the format of source compressed image data in the srcDesc parameter. The image transcoder should allocate a new image description and return it in the dstDesc parameter. The new image description should be a completely filled out image description which is sufficient for correctly decompressing the data generated by subsequent calls to ImageTranscoderConvert .

ImageTranscoderConvert

Performs image transcoding operations.

pascal ComponentResult ImageTranscoderConvert (
                     ImageTranscoderComponent itc,
                     void *srcData,
                     long srcDataSize,
                     void **dstData,
                     long *dstDataSize);
itc
The image transcoder component.

srcData
Contains a pointer to the source compressed image data to transcode.

srcDataSize
Indicates the size of the source image data, in bytes.

dstData
Returns a pointer to the transcoded data.

dstDataSize
Returns the size of the transcoded data, in bytes.

DISCUSSION

The image transcoder component is responsible for allocating storage for the transcoded data, transcoding the data, and returning a pointer to the transcoded data in the dstData parameter. The size of the transcoded data in bytes should be returned in the dstDataSize parameter. The caller is responsible for disposing of the transcoded data using the ImageTranscoderDisposeData function.

The memory allocated to store the transcoded image data must not be in an unlocked handle. Even if the image transcoding operation can be performed in place, the transcoded data must be placed in a separate block of memory from the source data. The image transcoder component must not write back into the source image data.

The responsibility for allocating the buffer for the transcoded data has been placed in the transcoder with the intent that some hardware manufacturers may find it useful to place the transcoded data directly into on-board memory on their video board. If the transcoding operation is being performed on a QuickTime movie, the transcoded data pointer will be almost immediately passed on to a decompressor. If the decompressor is implemented in hardware, performance may be increased because the transcoded data is already loaded onto the decompression hardware.

ImageTranscoderDisposeData

Disposes of transcoded data.

pascal ComponentResult ImageTranscoderDisposeData (
                     ImageTranscoderComponent itc,
                     void *dstData);
itc
The image transcoder component.

dstData
Contains a pointer to the transcoded data.

DISCUSSION

When the client of the image transcoder component is done with a piece of transcoded data, ImageTranscoderDisposeData must be called with a pointer to the transcoded data. The image transcoder component should not make any assumptions about the maximum number of outstanding pieces of transcoded data or the order in which the transcoding data will be disposed.

ImageTranscoderEndSequence

Ends an image transcoding sequence.

pascal ComponentResult ImageTranscoderEndSequence (ImageTranscoderComponent itc);
itc
The image transcoder component whose transcoder sequence is ending.

DISCUSSION

ImageTranscoderEndSequence is called when there are no more frames of data to be transcoded using the parameters specified in the previous call to ImageTranscoderBeginSequence . After calling this function the component will either be closed or receive another call to ImageTranscoderBeginSequence with a different image description. (For example, the dimensions of the source image may be different.)


© 1999 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top |